﻿//-------------------------------------------------------------------
//	Copyright (c) 2010-2014  Zhirnov Andrey
//	This file is part of the "UX Standard Lib" project.
//	See copyright notice in "UX_Logger.h".
//-------------------------------------------------------------------

#ifdef __UX_STL_UNIT_TEST__

#define UX_ZLIB_DISABLE
#define UX_LIBARCHIVE_DISABLE

#include "../ux_logger.h"
#include "../../stl_ext/OS/OS.h"

using namespace UX_STL;
using namespace UXLogger;


bool Test0()
{
	CLogger		cLogger;
	CWindow		sWnd;
	Thread		sThread;

	cLogger.Create( e_log_output::MESSAGE_BIT |
					e_log_output::LOG_FILE_BIT |
					e_log_output::CONSOLE_BIT |
					e_log_output::IDE_CONSOLE_BIT, "log.html" );
	
	winapi::Sleep(1000);
	cLogger.Write( "1111111", e_log_msg::ERROR_0 );


	sWnd.CreateInThread( &sThread, CWindow::TDescriptor( UXMath::uvec2(640,480) ), "TestWnd" );
	//sWnd.Show();

	while ( true )
	{
		winapi::Sleep(2000);
		cLogger.Write( "1111111", e_log_msg::DEBUG );
	}

	CHECK_ERR( false );


	return true;
}


#include "../../stl_core/ux_stl_core_lib.h"
#include "../../stl_ext/ux_stl_ext_lib.h"

#ifdef PLATFORM_WINDOWS
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
#endif
{
	Test0();
	return 0;
}

#endif	__UX_STL_UNIT_TEST__